﻿using System.Diagnostics.Contracts;
using System.Linq.Expressions;

namespace System.Reactive.Linq
{
	[ContractClass(typeof(IQbservableProviderContract))]
	public interface IQbservableProvider
	{
		IQbservable<TResult> CreateQuery<TResult>(Expression expression);
	}

	[ContractClassFor(typeof(IQbservableProvider))]
	internal abstract class IQbservableProviderContract : IQbservableProvider
	{
		public IQbservable<TResult> CreateQuery<TResult>(Expression expression)
		{
			Contract.Requires(expression != null, null, "expression != null");
			Contract.Ensures(Contract.Result<IQbservable<TResult>>() != null, null, "Contract.Result<IQbservable<TResult>>() != null");
			return null;
		}
	}
}